const state = {
    actionSystemId: "",
    pagination: {
        total: 0,
        current: 1,
        size: 10,
    }
}

const mutations = {
    SAVE_SYSTEM_ID(state, systemId) {
        state.actionSystemId = systemId
    },
    SAVE_PAGINATION(state, pagination) {
        state.pagination = pagination
    },
    SAVE_PAGINATION_SIZE(state, size) {
        state.pagination.size = size
    }

}

const actions = {
    saveSystemId({commit}, systemId) {
        commit('SAVE_SYSTEM_ID', systemId)
    },
    savePagination({commit}, pagination) {
        commit('SAVE_PAGINATION', pagination)
    },
    savePaginationSize({commit}, size) {
        commit('SAVE_PAGINATION_SIZE', size)
    }
}

export default {
    state,
    mutations,
    actions
}
